home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6122 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  974 b 

  1. Path: dialup-14-c-50.gw.umn.edu!user
  2. From: zeng0007@gold.tc.umn.edu (Yuemo Zeng)
  3. Newsgroups: comp.lang.c++
  4. Subject: Binary Search Tree Class Problem
  5. Date: 10 Feb 1996 18:20:04 GMT
  6. Organization: University of Minnesota
  7. Message-ID: <zeng0007-1002961218270001@dialup-14-c-50.gw.umn.edu>
  8. NNTP-Posting-Host: dialup-14-c-50.gw.umn.edu
  9.  
  10. I try to programm binary search tree. The procedure is common: define a
  11. node class, and then a binary tree class which is a friend of node class.
  12. I know the problem is in somewhere of the constructor, beside the default
  13. constructor, a insert function is used to add node to the tree.
  14.  
  15. Everytime I call a tree member function, I will got the following error message.
  16.  
  17. usetree.C: In function `int main()':
  18. usetree.C:67: request for member `insert' in `tree()', which is of
  19. non-aggregate typ
  20. e `BST ()()'
  21.  
  22. Can anyone interpreter this message and help me out?  
  23.  
  24. Thanks!
  25.  
  26. -- 
  27. Yuemo Zeng
  28. zeng0007@gold.tc.umn.edu
  29. http://dragon.labmed.umn.edu/~zeng/
  30.